<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
<div style="padding-left:10px;border:1px solid red">
    <label>用户名</label>
    <input type="text" >
    <br>
    <label>密码</label>
    <input type="password" ><br>
    <div id="div1" style="display:inline-block;width:90px;height:90px;margin-left:10px;margin-right:10px;border:1px solid red"></div>
    <div id="div2" style="display:inline-block;width:90px;height:90px;border:1px solid red"></div>
    </div>

</body>
<script type="text/javascript">
    alert(document.getElementById("div2").offsetLeft);
    </script>
</html>